<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>统战成员学习平台</title>
    <link rel="stylesheet" type="text/css" href="../../css/base.css" />
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
</head>

<body class="white">
    <div id='app' class="app " style="display:none" v-show="true">
        <header class="red">
            <div class="ui_border_b">
                <span tapmode @click="closeToPlanList()" class="left"><i class="icon_back_white"></i></span>
                <p>文章详情</p>
            </div>
        </header>
        <div class="app-content zx-content">
            <p class="title">{{articleDetail.title}}</p>
            <div class="content" v-html="articleDetail.content" style="overflow-x:auto;-webkit-overflow-scrolling: touch;"></div>
        </div>
    </div>
    <script type="text/javascript" src="../../script/api.js"></script>
    <script type="text/javascript" src="../../script/vue.min.js"></script>
    <script type="text/javascript" src="../../script/common.js"></script>
    <script type="text/javascript" src="../../script/layer_mobile/layer.js"></script>
    <script>
        new Vue({
            el: '#app',
            data() {
                return {
                    articleDetail: {}
                }
            },
            mounted() {
                var $this = this;
                apiready = function () {
                    $this.getData()
                }
                
            },
            methods: {
                getData() {
                    let $this = this;
                    let newsId = api.pageParam.newsId;
                    post('/client/news/newsContent', {
                        newsId: newsId
                    }, function (ret) {
                        if (ret.code == 200) {
                            $this.articleDetail = ret.data;
                            $this.postRecord()
                        } else {
                            msgUtil.toast({
                                msg: ret.message
                            });
                        }
                    });
                },
                postRecord(){
                    let $this = this;
                    let newsId = api.pageParam.newsId;
                    let scheduleId = api.pageParam.scheduleId
                    post('/client/news/newsRecord', {
                        newsId: newsId,
                        scheduleId:scheduleId
                    }, function (ret) {
                        if (ret.code == 200) {
                        } else {
                            msgUtil.toast({
                                msg: ret.message
                            });
                        }
                    });
                },
                closeToPlanList: function () {
                    var $this = this;
                    api.sendEvent({
                        name: 'reloadPlan'
                    });
                    closeWin();
                }
            },
        })
    </script>
</body>